home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 39
/
039.d81
/
envelope master
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
6KB
|
202 lines
10 poke 53280,0:poke 53281,0:print"[147][149]":dim a$(7)
30 gosub 60500
50 :
60 print"[147]":printtab(8)" decimal equivelents [146][154]":print:size=0
70 restore:for x=1 to 7:read a$(x):next x
80 for x=1 to 7:size=size+.125:printtab(14)a$(x);"=";size:next x
90 print"[150] please enter the envelops measurements"
100 print"in decimal. if uncertain, please check.[153]"
105 print"standard bussiness envelope = 9 x 4.5"
120 print"[129]enter the envelope's width [152]:";:nu=1:gosub61000:ew=val(a$)
125 ifa$="" then print"[145][145]";:goto120
130 print"[156]enter the envelope's height [152]:";:nu=1:gosub 61000:eh=val(a$)
135 ifa$="" then print"[145][145]";:goto130
140 print"[147] return address "
141 print"enter your choice of return addresses"
142 print" 1[152])[150] commodore magazine
143 [153]" 2print#) printloadstar magazine"
144 [153]" 3print#) cont'other'"
145 [153]"openenter selection print#(cont1-3,0=abortprint#) :";:nu[178]1:[141] 61000
146 [139]a$[178]"0" [167] [141]62000 :[137] 140
147 [139] a$[178]"1" [167] 760
148 [139] a$[178]"2" [167] 790
149 [139] a$[179][177]"3" [167]140
150 [153]"load return address "
155 [153]"print# from list(nameprint#) print# :";:nu[178]0:[141]61000:rn$[178]a$
185 [139]a$[178]""[167][141]62000:[137]150
190 [153]"print#closefrom list(foraddresslist)print#:";:[141]61000:ra$[178]a$
191 [139]a$[178]""[167][141]62000:[137]150
195 [153]"print# from list(syscitylist) print#:";:[141]61000:rc$[178]a$
196 [139]a$[178]""[167][141]62000:[137]150
200 [153]"print# from list(statelist) print#:";:[141]61000:rs$[178]a$
201 [139]a$[178]""[167][141]62000:[137]150
205 [153]"print# from list(contziplist) print#:";:[141]61000:rz$[178]a$
206 [139]a$[178]""[167][141]62000:[137]150
210 [153]"load":
211 [153]"load return address "
212 [153]" name print#:list";rn$
213 [153]" foraddress print#:list";ra$
214 [153]" syscity print#:list";rc$
215 [153]" state print#:list";rs$
217 [153]" contzip code print#:list";rz$
220 [153]"is this correct (y/n):";:nu[178]0:[141]61000:an$[178]a$:[139]a$[178]""[167] 210
225 [139] an$[178]"y" [167] 230
226 [139] an$[178]"n" [167] 140
227 [137] 210
230 [153]"load sending address "
231 [153]"enter your choice of sending addresses"
232 [153]" 1print#)def commodore magazine
233 print" 2[152]) [153]loadstar magazine"
234 print" 3[152]) [154]'other'"
235 print"[159]enter selection [152]([154]1-3,0=abort[152]) :";:nu=1:gosub 61000
236 ifa$="0" then gosub62000:goto230
237 if a$="1" then 820
238 if a$="2" then 850
239 if a$<>"3" then230
250 print"[147] sending address "
255 print"[152] to [155](name[152]) [152] :";:nu=0:gosub61000:tn$=a$
256 ifa$=""thengosub62000:goto 250
260 print"[152][160] to [155]([129]address[155])[152]:";:gosub61000:ta$=a$
261 ifa$=""thengosub62000:goto 250
265 print"[152] to [155]([158]city[155]) [152]:";:gosub61000:tc$=a$
266 ifa$=""thengosub62000:goto 250
270 print"[152] to [155](state[155]) [152]:";:gosub61000:ts$=a$
271 ifa$=""thengosub62000:goto 250
275 print"[152] to [155]([154]zip[155]) [152]:";:gosub61000:tz$=a$
276 ifa$=""thengosub62000:goto 250
280 print"[147]":
281 print"[147] sending address "
282 print" name [152]:[155]";tn$
283 print" [129]address [152]:[155]";ta$
284 print" [158]city [152]:[155]";tc$
285 print" state [152]:[155]";ts$
287 print" [154]zip code [152]:[155]";tz$
290 print"is this correct (y/n):";:nu=0:gosub61000:an$=a$:ifa$=""then 281
340 if an$="y" then goto 360
350 if an$="n" then goto 230
355 goto 281
360 print" [147]"
370 print"is there a lower flag to the address"
380 print"[154]example[152]: photographs-do not bend"
390 print"[152] responce[155] ([154]y/n[155]) :";:nu=0:gosub61000:af$=a$
400 if af$="n"then 420
405 if af$="y"then 410
406 goto 360
410 print"[156]enter the message [155]:";:gosub61000:flag$=a$
420 print"[147]"
430 print"[150] insert[160]the";eh;"x";ew;"envelope"
440 print"[129] turn on printer and press [158](return[158])"
445 print" [154]or press (space) to abort"
450 geta$:ifa$=""then 450
455 ifa$=" "then gosub62000:goto 420
460 ifa$<>chr$(13) then 450
470 open 15,4,15:close 15
480 if st<>0 then print"the printer does not respond ...":goto 440
490 open 10,4,10:print#10:close 10
500 :
510 :
520 :adj=-1
530 open4,4
540 print#4,spc(1);rn$
550 print#4,spc(1);ra$
560 print#4,spc(1);rc$;", ";rs$
570 print#4,spc(1);rz$
580 gosub 880:rem calculate down to address
590 for x=1 to da:print#4:next x
600 gosub 900:rem get longest string
610 gosub 930:rem calculate spc(#)
620 print#4,spc(x);tn$
630 print#4,spc(x);ta$
640 print#4,spc(x);tc$;", ";ts$
650 print#4,spc(x);tz$
660 if af$="y"then gosub 950:rem calculate lines down
670 for x=1 to dn:print#4:next x
680 gosub 960:rem calculate spc(x) to center up flag$
690 print#4,spc(x);flag$
700 print"[147][150]print another [152]([154]y/n[152]) :";:gosub61000:an$=a$
710 if an$="n"then close4:gosub 62000:goto 700
715 if an$="y"then 720
717 goto 700
720 print"[129]same addresses [152]([154]y/n[152]) :";:gosub61000:an$=a$
730 if an$="y"then close4:goto 490
735 if an$="n"then close4:goto 60
740 goto 720
750 print#4:close 4:end
760 rem default return address #1
770 rn$="commodore magazine":ra$="1200 wilson drive":rc$="west chester"
780 rs$="pa.":rz$="19380":goto 210
790 rem default return address #2
800 rn$="loadstar":ra$="p.o. box 30008":rc$="shreveport"
810 rs$="la":rz$="71130-0008":goto 210
820 rem default (to) address #1
830 tn$="commodore magazine":ta$="1200 wilson drive":tc$="west chester"
840 ts$="pa.":tz$="19380":goto 280
850 rem default (to) address #2
860 tn$="loadstar":ta$="p.o. box 30008":tc$="shreveport"
870 ts$="la":tz$="71130-0008":goto 280
880 da=int((eh*6)/2)-6:if da<1 then da=0
890 return
900 ac=len(tn$):if len(ta$)>ac then ac=len(ta$)
910 if len(tc$)+len(ts$)+2>ac then ac=len(tc$)+len(ts$)+2
920 return
930 x=int((ew*10)/2)+adj-(ac/2):if x<1 then x=0
940 return
950 dn=int(da*.6):return
960 x=int((ew*10)/2)+adj-(len(flag$)/2):if x<1 then x=0
970 return
980 data "1/8","1/4","3/8","1/2","5/8","3/4","7/8"
60500 rem
60510 print"[147][146] [158][204] [207] [193] [196] [211] [212] [193] [210]"
60520 print
60530 print" [154][208]roudly presents:"
60550 print
60560 print
60570 print" [197] [206] [214] [197] [204] [207] [208] [197] [205] [193] [211] [212] [197] [210]"
60580 print" [152][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
60590 print
60600 print" "
60610 print" By:Jerome E Reuter [176][174] "
60620 print" [173][189] "
60630 print" "
60640 print" "
60650 print" LOADSTAR "
60660 print" P.O. Box 30008 "
60670 print" Shreveport, LA "
60680 print" 71130-0008 "
60690 print" "
60700 print" "
60710 print" "
60720 print
60730 print" [150] Copyright 1987 "
60740 print" "
60750 print" [154] PRESS (SPACE) ";
60760 print"";
60800 geta$:ifa$=""then60800
60805 ifa$<>" "then60800
60810 print"[147]";chr$(142):return
61000 a$="":print"[164]";:fora=1to25
61005 getb$:ifb$=""then61005
61010 ifb$=chr$(13) then print"[157] ":return
61015 ifb$=chr$(20) and a>1 then print"[157][157] [157][157][164]";:a=a-1:a$=left$(a$,a-1):goto61005
61020 ifb$=chr$(20) then 61005
61025 if(a=25)or((nu)and(a=6))then 61005
61030 ifb$>="0"andb$<="9" then 61070
61035 ifb$="." then 61070
61036 if nu=1 then 61005
61040 ifb$=>"[193]" and b$<="[218]" then 61070
61045 ifb$<" "or b$>"z" then 61005
61070 print"[157]"b$;:poke212,.:print"[164]";:a$=a$+b$:next
62000 prin